package com.ruoyi.web.admin.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.admin.mapper.TdmCmchplcMapper;
import com.ruoyi.web.admin.domain.TdmCmchplc;
import com.ruoyi.web.admin.service.ITdmCmchplcService;

/**
 * cmc_hplcService业务层处理
 * 
 * @author ly
 * @date 2022-03-10
 */
@Service
public class TdmCmchplcServiceImpl implements ITdmCmchplcService 
{
    @Autowired
    private TdmCmchplcMapper tdmCmchplcMapper;

    /**
     * 查询cmc_hplc
     * 
     * @param id cmc_hplc主键
     * @return cmc_hplc
     */
    @Override
    public TdmCmchplc selectTdmCmchplcById(Long id)
    {
        return tdmCmchplcMapper.selectTdmCmchplcById(id);
    }

    /**
     * 查询cmc_hplc列表
     * 
     * @param tdmCmchplc cmc_hplc
     * @return cmc_hplc
     */
    @Override
    public List<TdmCmchplc> selectTdmCmchplcList(TdmCmchplc tdmCmchplc)
    {
        return tdmCmchplcMapper.selectTdmCmchplcList(tdmCmchplc);
    }

    /**
     * 新增cmc_hplc
     * 
     * @param tdmCmchplc cmc_hplc
     * @return 结果
     */
    @Override
    public int insertTdmCmchplc(TdmCmchplc tdmCmchplc)
    {
        tdmCmchplc.setCreateTime(DateUtils.getNowDate());
        return tdmCmchplcMapper.insertTdmCmchplc(tdmCmchplc);
    }

    /**
     * 修改cmc_hplc
     * 
     * @param tdmCmchplc cmc_hplc
     * @return 结果
     */
    @Override
    public int updateTdmCmchplc(TdmCmchplc tdmCmchplc)
    {
        tdmCmchplc.setUpdateTime(DateUtils.getNowDate());
        return tdmCmchplcMapper.updateTdmCmchplc(tdmCmchplc);
    }

    /**
     * 批量删除cmc_hplc
     * 
     * @param ids 需要删除的cmc_hplc主键
     * @return 结果
     */
    @Override
    public int deleteTdmCmchplcByIds(Long[] ids)
    {
        return tdmCmchplcMapper.deleteTdmCmchplcByIds(ids);
    }

    /**
     * 删除cmc_hplc信息
     * 
     * @param id cmc_hplc主键
     * @return 结果
     */
    @Override
    public int deleteTdmCmchplcById(Long id)
    {
        return tdmCmchplcMapper.deleteTdmCmchplcById(id);
    }
}
